package ooday02;

public class OverrideDemo {
    public static void main(String[] args) {
        //重写方法被调用时,看对象的类型执行方法(new谁就调谁)
        Student zg = new Student("张光",23,"故宫","正式班","001");
        zg.sayHi();
        Teacher ll = new Teacher("李林",34,"黑龙江",3456.7);
        ll.sayHi();
        Doctor zl = new Doctor("赵亮",45,"济南","高级医师");
        zl.sayHi();
    }
}
